using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace PACKETPARSERMAX20.CORE
{
	public class game_event_gameobject : MangosBase
	{
		public System.UInt32? guid;
		public System.Int16? event_;




		public override string GetInsertCommand()
		{
			return string.Format("INSERT IGNORE INTO `game_event_gameobject` (`guid`, `event`) VALUES ('{0}', '{1}');", guid.GetValueOrDefault(), event_.GetValueOrDefault());
		}


		public override string GetUpdateCommand()
		{
            StringBuilder sb = new StringBuilder();
						sb.Append("UPDATE `game_event_gameobject` SET ");
                        if (event_ != null)
			{
				sb.AppendLine("`event`='" + event_.Value.ToString() + "'");
			}
				sb = sb.Replace("\r\n", ", ");
				sb.Append(" WHERE `guid`='" + guid.Value.ToString() + "';");
				sb = sb.Replace(",  WHERE", " WHERE");

            return sb.ToString();
		}


	}
}
